﻿@{
    Layout = null;
}

<!DOCTYPE html>

<html>
<head>
    <meta name="viewport" content="width=device-width" />
    <title></title>
    @Styles.Render("~/Content/css")
</head>
<body style="background-color:white">
    <div style="text-align:center"><button class="btn btn-primary" onclick="dayin()">打印</button></div>
    <div>
        <table class="table table-striped table-bordered table-hover ">
            <thead>
                <tr>
                    <th>参数名</th>
                    <th>参数值</th>
                </tr>
            </thead>
            <tbody id="configrationtable"></tbody>
        </table>
    </div>
    @Scripts.Render("~/bundles/jquery")
    @Scripts.Render("~/bundles/bootstrap")
    <script>
    $(document).ready(function () {
        $.ajax({
            url: "/Adjust/Configuration",
            method: 'GET',
            data: { wellid: sessionStorage.wellid, sensorname: sessionStorage.configuration },
            dataType: 'json',
            success: function (data) {
                if (data.status == 3) { alert("暂无数据") }
                else {
                    $.each(data.data, function (i, item) {
                        $("#configrationtable").append(
                            '<tr><td>' + item.Key + '</td><td>' + item.Value + '</td></tr>'
                            );
                    })
                }
            }
        });
    });
    function dayin() {
        window.print();
    }
    </script>
</body>
</html>
